<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
	<head>
		<meta charset="utf-8">
		<title>考勤发布</title>
		<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css" />
		<link rel="stylesheet" type="text/css" href="../../static/css/me.css" th:href="@{/css/me.css}"/>
	</head>
	<body>
		<!-- 主体 -->
		<div class="ui container margin-t-small">
			<form class="ui form" method="post" th:action="@{/record/save}">
				<div class="ui segment padded-lr-larg">
					<div class="ui mini negative message"  th:unless="${#strings.isEmpty(message)}" th:text="${message}"></div>
					日期：
					<div class="field">
						<input type="date" name="recordTime" placeholder="日期" />
					</div>
					<p>姓名：</p>
					<div class="field">
						<input type="text" name="name" placeholder="姓名" />
					</div>
					<p>学号：</p>
					<div class="field">
						<input type="text" name="sno" placeholder="学号" />
					</div>
					<p>班级：</p>
					<div class="field">
						<div class="ui selection dropdown">
							<input type="hidden" name="grades"/>
							<i class="dropdown icon"></i>
							<div class="default text">班级</div>
							<div class="menu">
								<div class="item" data-value="计算机1701">
									计算机1701
								</div>
								<div class="item" data-value="计算机1702">
									计算机1702
								</div>
							</div>
						</div>
					</div>
					<p>状态：</p>
					<div class="ui field input">
						<input type="text" name="state" placeholder="状态" />
					</div>
					<div class="ui right aligned basic segment">
						<button class="ui button" onclick="window.history.go(-1)">返回</button>
						<button type="submit" class="ui blue button">添加</button>
					</div>
				</div>
			</form>
		</div>



		<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
		<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
		<script>
			$('.ui.dropdown').dropdown();
			$('.ui.form')
					.form({
						fields: {
							recordTime: {
								identifier: 'recordTime',
								rules: [{
									type: 'empty',
									prompt: '请输入日期'
								}]
							},
							name: {
								identifier: 'name',
								rules: [{
									type: 'empty',
									prompt: '请输入姓名'
								}]
							}
							,
							sno: {
								identifier: 'sno',
								rules: [{
									type: 'empty',
									prompt: '请输入学号'
								}]
							}
						}
					});
		</script>
	</body>
</html>
